<?php if(!defined('HOST'))die('not access');?>
<script >
    $(document).ready(function(){
        {params};
        var a = $('#veiw_{rand}').bootstable({
            tablename:'company',sort:'id',dir:'desc',modedir:'{mode}:{dir}',
            url:js.getajaxurl('getCompanyList','{mode}','{dir}'),
            columns:[{
                text:'单位名称',dataIndex:'name'
            },{
                text:'项目数量',dataIndex:'num'
            }],
            //点击行事件
            celldblclick:function(){
                var id=a.changedata.id;
                var sdate=$('#search_sdate_{rand}').val();
                var edate=$('#search_edate_{rand}').val();
                var urls = 'cg,index,projectlistadmin,comid='+a.changedata.id+',sdate='+sdate+',edate='+edate;
                console.log(urls);
                addtabs({num:'gather-admin',url:urls,icons:'',name:'招标情况汇总表'});
            },
        });

        c = {
            search:function(){
                var sdate=$('#search_sdate_{rand}').val();
                var edate=$('#search_edate_{rand}').val();
                a.setparams({name:s,sdate:sdate,edate:edate},true);
            },
        };
        js.initbtn(c);
    });
</script>

<div>
    <table>
        <tr>
            <td nowrap style="width: 1%;padding-left:10px;">
                项目时间：
                <input onclick="js.datechange(this,'date')" value="" class="inputs datesss" inputtype="date" readonly="" name="search_sdate" id="search_sdate_{rand}" style="width:110px">
                <input onclick="js.datechange(this,'date')" value="" class="inputs datesss" inputtype="date" readonly="" name="search_edate" id="search_edate_{rand}" style="width:110px">
<!--                <span>&nbsp;&nbsp;</span>-->
<!--                <button class="btn" id="t_year_{rand}" type="button">年</button>-->
<!--                <button class="btn" id="t_season_{rand}" type="button">季</button>-->
<!--                <button class="btn" id="t_month_{rand}" type="button">月</button>-->
            </td>
            <td nowrap style="width: 5%;padding-left:10px;">
                <span>&nbsp;&nbsp;</span>
                <button class="btn btn-default" click="search" type="button">检索</button>
            </td>
        </tr>
    </table>
</div>

<div class="blank10"></div>
<div id="veiw_{rand}"></div>

<script>
    var date=new Date;
    var y = date.getFullYear()
    $('#search_sdate_{rand}').val(y+'-01-01');
</script>